<%@page import="argos.metadata.ComponentMetaInfo"%>
<%@page import="argos.naming.NamingService"%>
<%@page import="java.io.File"%>
<%@page import="argos.config.Config"%>

<%! String dep = new String(""); %>

<html>
<head>
<title>:: Argos ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="container">
	<div class="centerbox">
		<div class="header">
			<center><img src="img/Argos.png" width="545px" height="243px" /></center>
		</div>
		<div class="content">
			<h1>Argos</h1>
			The monitoring tool Argus can be started using <a
				href="http://ablab03.cs.uit.no/Argus/Argus.jnlp">webstart</a>.<br />
			Programmers manual can be found <a
				href="http://ablab03.cs.uit.no/doc/Programming%20manual.pdf">here</a>.<br />
			<br>

			<table>
				<tr>
					<td width="45%">
					<h2>Loaded Components</h2>

					<%
					for(ComponentMetaInfo meta : NamingService.getInstance().getAllComponentMetaData()) {
						File file = new File(Config.get(Config.DEFAULT_DEPLOY_FOLDER) + "/" + meta.getService().getName());
						if(file.exists()) {
							out.println("<a href=\"" + meta.getService().getName() + "\">"+meta.getName()+"</a><br />");
						}
						else {
							dep += meta.getName()+"<br />";
						}
					}
					%>
					<h2>Dependencies</h2>
					<%=dep %>
					</td>
					<% dep = ""; %>
					<td width="45%">
						<span class="link">
						<a href="http://ablab10.cs.uit.no:8008/apms-wiki/" alt="Argos Wiki">
							<center><img src="img/wiki.jpg" /></center>
							<p>The Argos MediaWiki contains tutorials, documentation and a programmers manual</p>
						</a>
						</span>
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>
</body>
</html>
